package com.atguigu.jxc.dao;

import com.atguigu.jxc.entity.CustomerReturnList;
import com.atguigu.jxc.vo.SaleListAndCustomerReturnList;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface CustomerReturnListDao {
    //新增客户退货单
    void saveCustomerReturnList(CustomerReturnList customerReturnList);

    //客户退货单查询（可查询条件：退货单号、客户、退款状态）
    List<CustomerReturnList> listSelect(@Param("returnNumber") String returnNumber, @Param("customerId") Integer customerId, @Param("state") Integer state, @Param("sTime") String sTime, @Param("eTime") String eTime);

    //删除退货单
    void deleteCustomerReturnList(@Param("customerReturnListId") Integer customerReturnListId);

    //根据id查询退款状态
    CustomerReturnList selectById(@Param("customerReturnListId") Integer customerReturnListId);

    //修改客户退货单退款状态
    void updateState(CustomerReturnList customerReturnList);

    //客户退货统计（可根据 商品类别、商品编码或名称 条件查询）
    List<SaleListAndCustomerReturnList> count(@Param("sTime") String sTime, @Param("eTime") String eTime, @Param("goodsTypeId") Integer goodsTypeId, @Param("codeOrName") String codeOrName);
}
